﻿//using System.Collections.Generic;
//using System.Linq;
//using Abp.Configuration;
//using Abp.Dependency;
//using Abp.Extensions;
//using Microsoft.AspNetCore.Mvc.Razor;
//using Mt.Site.Core.Configuration;

//namespace Mt.Site.Web.Startup
//{
//    public class RazorViewLocationExpander : IViewLocationExpander
//    {
//        public RazorViewLocationExpander()
//        {
//        }

//        public void PopulateValues(ViewLocationExpanderContext context)
//        {
//        }

//        public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context,
//            IEnumerable<string> viewLocations)
//        {
//            var currentThemeName = IocManager.Instance.Resolve<ISettingManager>()
//                .GetSettingValue(AppSettings.UiManagement.Theme);

//            var locations = viewLocations.ToList();

//            //{0} is like "Components/{componentname}/{viewname}"
//            locations.Add("~/Areas/AppAreaName/Views/Shared/{0}.cshtml");
//            locations.Add("~/Areas/AppAreaName/Views/Shared/Themes/" + currentThemeName.ToPascalCase() +
//                          "/{0}.cshtml");

//            return locations;
//        }
//    }
//}
